package com.forekonw.demo4;

import java.util.Scanner;

public class TestMethod8 {
   public static int[] asd(int[]array){
//       int[]array ={1,5,3,24,2,8,45,1};
       for (int i =1;i<array.length;i++) {
           for (int j = 0; j < array.length - i; j++) {
               if (array[j] > array[j + 1]) {
                   int temp = array[j];
                   array[j] = array[j + 1];
                   array[j + 1] = temp;
               }
           }
       }
       return array;
   }
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入五个整数");
        int[] b = new int[5];
        for (int i =0;i<b.length;i++){
            b[i]=input.nextInt();
        }
        for (int i = 0;i<b.length;i++){
            int[] c= asd(b);
            System.out.println(b[i]);
        }
    }
}
